package GUI;


import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;

import java.awt.EventQueue;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Main extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Main frame = new Main();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Main() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(null);
		setContentPane(contentPane);
		
		JButton btnOrdre = new JButton("Ordre");
		btnOrdre.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				showOrderList();
			}
		});
		btnOrdre.setBounds(31, 215, 97, 25);
		contentPane.add(btnOrdre);
		
		JButton btnProdukter = new JButton("Produkter");
		btnProdukter.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				showProductList();
			}
		});
		btnProdukter.setBounds(140, 215, 97, 25);
		contentPane.add(btnProdukter);
	}
	
	private void showOrderList()
	{
		OrderList ol = new OrderList();
		ol.setVisible(true);
	}
	
	private void showProductList()
	{
		ProductList pl = new ProductList();
		pl.setVisible(true);
	}

}
